﻿<%@ Control Language="c#" AutoEventWireup="false" Inherits="Web.Control.WWW.Contacts.MyContacts" %>

<script>
var gRemove = "<%=GetText("C0049")%>";
var gSendM = "<%=GetText("C0079")%>";
var gChatN = "<%=GetText("C0080")%>";
var gMale = "<%=GetText("C0012")%>";
var gFemale = "<%=GetText("C0013")%>";
var gAccept = "<%=GetText("C0057")%>";
var gDecline = "<%=GetText("C0058")%>";
var gCancel = "<%=GetText("C0056")%>";
var gOnlineN="<%=GetText("C0038")%>";
var gDateFormat = "<%=GetText("C0033")%>";
var gStrDate = "<%=GetText("C0032")%>";
var C0102 = "<%=GetText("C0102")%>";
var C0103 = "<%=GetText("C0103")%>";
var C0104 = "<%=GetText("C0104")%>";
var ShowUserType=<%=showUserType %>;
var HaveOrNoF=<%=FriendCount %>!=0 ? 1 : 0;
var GP066 = '<%=GetText("C0049")%>';
var C1008 = '<%=GetText("C1008")%>';
var C0069 = '<%=GetText("C0069")%>';
</script>

<div class="common">
	<div id="new_body">
		<div id="body_900">
			<div id="body_left"></div>
			<div id="body_main">
				<%if (opMessage > -1) {%>
				<div id="OPMessgeID">
					<div class="MessagePanel4">
						<img id="MessageImg" src="/images/ico_info.gif" style="border-width: 0px;" alt="" />
						<div id="MessageText">
							<%if (opMessage == 0) {%><%=GetText("CT052")%><%} %>
							<%else if (opMessage == 1) {%><%=GetText("CT053")%><%} %>
							<%else if (opMessage == 2) {%><%=GetText("C1002")%><%} %>
							<%else if (opMessage == 3) {%><%=GetText("C1006")%><%} %>
						</div>
					</div>
				</div>
				<%} %>
				<div class="title">
					<h1><%=GetText("M0029")%></h1>
					<div id="FriendsID" style=""></div>
					<div id="ReceivedID" style="display: none"></div>
					<div id="SentID" style="display: none"></div>
					<div id="noFPrompt" class="margin20" style="display: none; text-align: left"></div>
				</div>
				<div>
					<ul class="sort_sel">
						<li id="FriendTags" class="unselATags first" onclick="SortList(10)"><span dir="ltr"><a href="#"><%=GetText("CT013")%> (<div style="display: inline" id="FriendCount"><%=FriendCount%></div>)</a></span></li>
						<li id="ReceTags" class="unselATags" onclick="SortList(2)"><span dir="ltr"><a href="#"><%=GetText("CT014")%> (<div style="display: inline" id="ReceiveCount"><%=ReceiveCount%></div>)</a></span></li>
						<li id="SendTags" class="unselATags" onclick="SortList(3)"><span dir="ltr"><a href="#"><%=GetText("CT015")%> (<div style="display: inline" id="SendCount"><%=SendCount%></div>)</a></span></li>
						<li class="unselATags"><span><a href="/contacts/invite.htm"><%=GetText("CT016")%></a></span></li>
					</ul>
					<div class="clear"></div>
				</div>
				<div class="Center9001n">
					<div class="center9001right">
						<div id="Center9001Content">
							<div class="friends_area">
								<%if (FriendCount > 0) {%>
								<div id="ContactFriends">
									<div id="FriendsList">
										<asp:Repeater ID="rfList" runat="server">
											<ItemTemplate>
												<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom: 10px;padding-bottom: 10px; border-bottom: 1px #eee solid; overflow: hidden">
													<tr>
														<td width="120" valign="top"><div class="Pic90"><a class="Photo_90" href="/<%#Eval("MemberNo") %>.htm"><%#Eval("Avatar").ToString() == "" ? "<img src=\"/Images/No_pic.gif\" />" : Eval("Avatar", "<img src=\"{0}\" />").ToString()%></a></div>
														</td>
														<td width="320" valign="top">
															<div><span class="text14"><a href="/<%#Eval("MemberNo") %>.htm"><%#HttpUtility.HtmlEncode(Eval("NickName").ToString())%></a></span> <span class="Orange10"><%#(bool)Eval("Online") == true ? GetText("C0038") : ""%></span></div>
															<div class="grey12"><%#(bool)Eval("IsShowBod") && Eval("Age").ToString()!=""? Eval("Age").ToString()+" " : ""%><%#GetGenderText(Eval("Gender").ToString()) != "" ? GetGenderText(Eval("Gender").ToString())+",": ""%>
																<%#GetText("C0102", new string[] { GetCountryText(Eval("Nationality").ToString()) })%>,
																<%=GetText("C0009")%> <%#Eval("City") %> <%#GetCountryText(Eval("Country").ToString())%></div>
															<div>
																<%=GetText("C0005")%>: <strong><%#BLF.StaticData.GetLanguageText(Eval("MotherTongue").ToString())%><img src="/Images/Level5.gif" /><%#(Eval("MotherTongue2").ToString().Trim()=="")?"":", "+(GetLanguageText(Eval("MotherTongue2").ToString())+Eval("motherTongue2Level","<img src=\"/Images/Level{0}.gif\" />"))%><%#(Eval("MotherTongue3").ToString().Trim() == "") ? "" : ", "+(GetLanguageText(Eval("MotherTongue3").ToString()) + Eval("motherTongue3Level", "<img src=\"/Images/Level{0}.gif\" />"))%><%#(Eval("MotherTongue4").ToString().Trim() == "") ? "" : ", "+(GetLanguageText(Eval("MotherTongue4").ToString()) + Eval("motherTongue4Level", "<img src=\"/Images/Level{0}.gif\" />"))%></strong>
																<br />
																<%=GetText("C0007")%>: <strong><%#(GetLanguageText(Eval("TargetLanguage").ToString()) + Eval("TargetLanguageLevel", "<img src=\"/Images/Level{0}.gif\" />"))%><%#(Eval("TargetLanguage2").ToString().Trim()== "") ? "" : ", "+(GetLanguageText(Eval("TargetLanguage2").ToString()) + Eval("TargetLanguage2Level", "<img src=\"/Images/Level{0}.gif\" />"))%><%#(Eval("TargetLanguage3").ToString().Trim()== "") ? "" : ", "+(GetLanguageText(Eval("TargetLanguage3").ToString()) + Eval("TargetLanguage3Level", "<img src=\"/Images/Level{0}.gif\" />"))%><%#(Eval("TargetLanguage4").ToString().Trim()== "") ? "" : ", "+(GetLanguageText(Eval("TargetLanguage4").ToString()) + Eval("TargetLanguage4Level", "<img src=\"/Images/Level{0}.gif\" />"))%></strong><div><%#(Eval("Avatar_title").ToString()==""?"":"<div class='thoughtbox'><div><div><div><div>"+Eval("Avatar_title")+"</div></div></div></div></div>")%></div>
															</div>
														</td>
														<td width="160" valign="top"><div class="margin20" style="margin-left: 20px"><img src="/Images/icon_common_mailbox.gif" align="absmiddle" /> <a href="#" title="$C0079$" <%#(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"$Getmail$('"+Eval("MemberNo")+"')\"":"onclick=\"NotAffirm()\""%> >$C0079$</a><br /><img src="/Images/icon_chat.gif" align="absmiddle" /> <a href="javascript:void(0);" <%#(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"javascript:('"+memberno+"'=='')?window.location.href='/user/login.htm?ReturnUrl='+top.location.href:up_launchWM( '"+memberno.TrimStart('T').TrimStart('0')+"', '"+Eval("MemberNo").ToString().TrimStart('T').TrimStart('0')+"' ); return false;\"":"onclick=\"NotAffirm()\""%> >$C0080$</a><br /><img src="/Images/icon_cancel.gif" align="absmiddle" /> <a href="#" onclick="OpContacts('<%#Eval("MemberNo") %>',1)">$C0049$</a></div></td>
													</tr>
												</table>
											</ItemTemplate>
										</asp:Repeater>
									</div>
									<script>
										document.getElementById("FriendsList").innerHTML = document.getElementById("FriendsList").innerHTML.replace(/\$C0079\$/gi, gSendM).replace(/\$C0080\$/gi, gChatN).replace(/\$C0049\$/gi, gRemove);
									</script>
								</div>
								<%} else {%>
								<div id="NoFriends">
									<p style="margin-bottom: 20px"><%=GetText("CT018")%>, <a href="/contacts/search.htm"><%=GetText("CT017")%></a></p>
									<asp:Repeater ID="rnofList" runat="server">
										<ItemTemplate>
											<div style="float: left; width: 141px; margin-bottom: 10px">
												<div class="pic90" style="width: 110px"><a class="photo_90" href="/<%#Eval("MemberNo") %>.htm"><%#Eval("Avatar").ToString() == "" ? "<img src=\"/Images/No_pic.gif\" />" : Eval("Avatar", "<img src=\"{0}\" />").ToString()%></a></div>
												<div style="overflow: hidden; white-space: nowrap; width: 135px"><%#(bool)Eval("Online")?"<img src='/Images/online.gif' title='Online Now!' />":"<img src='/Images/offline.gif' title='Offline' />" %>&nbsp;<a href="/<%#Eval("MemberNo") %>.htm"><%#HttpUtility.HtmlEncode(Eval("NickName").ToString())%></a>
													<p class="grey12"><%#GetText("C0104", new string[] { GetLanguageText(Eval("MotherTongue").ToString()) })%><br /><%#GetText("C0103", new string[] { GetLanguageText(Eval("TargetLanguage").ToString()) })%><br /><%#GetText("C0102", new string[] { GetCountryText(Eval("Nationality").ToString()) })%></p>
													<p><img src="/Images/icon_add.gif" align="absmiddle" /> <a href="#" title="<%=GetText("C0078")%>" <%#(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"$AddFriends$('"+Eval("MemberNo")+"')\"":"onclick=\"NotAffirm()\""%> )"><%=GetText("C0078")%></a></p>
												</div>
											</div>
										</ItemTemplate>
									</asp:Repeater>
								</div>
								<%} %>
								<div id="divPage" class="page_num DisplayNone"></div>
							</div>
						</div>
					</div>
					<div class="center9001left">
						<div id="QuestList">
							<%if (FriendCount > 0) {%>
							<div class="right_layerA">
							<div class="layer_contentA">
								<h4><%=GetText("CT021")%></h4>
								<div class="layer_contentA5">
								<ul class="right_ul margin10">
									<%foreach (Model.WWW_WWW.Answers.QuestionModel am in QList) { %>
									<li><a href='/answers/question/<%=am.QuestionID%>.htm'><%=HttpUtility.HtmlEncode(am.Question)%></a>
										<br />
										<span class="grey11"><a href='/<%=am.MemberNo%>.htm'><%=HttpUtility.HtmlEncode(am.Nickname)%></a> <%=FormatDiffDate(GetText("C0037"), am.DiffLastUpdate)%></span></li>
									<%}%>
								</ul>
								<p align="right"><a href="/answers/myqa-1-3.htm"><%=GetText("C0040")%></a></p>
								</div>
							</div>
							</div>
							<%} %>
						</div>
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div class="clear"></div>
		</div>
	</div>
</div>
<select id="selLang" style="display: none"><%=GetLanguageSelect("")%></select>
<select id="jselCountry" style="display: none"><%=GetCountrySelect("")%></select>
<div id="ContactsItem" style="display: none;">
	<div id="Div2" class="margin20" style="display: none; text-align: left"><%=GetText("CT018")%></div>
	<div id="Div1">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom: 10px;padding-bottom: 10px; border-bottom: 1px #eee solid; overflow: hidden">
			<tr>
				<td width="120" valign="top"><div class="Pic90"><a class="Photo_90" href="/$MemberNo$.htm">$Avatar$</a></div></td>
				<td width="320" valign="top">
					<div><span class="text14"><a href="/$MemberNo$.htm">$NickName$</a></span>&nbsp;<span class="Orange10">$Online$</span></div>
					<div class="grey12">$Age$$Gender$ $from$, <%=GetText("C0009")%> $City$$Country$</div>
					<div><%=GetText("C0005")%>: <strong>$MotherTongue$ $MotherTongue2$ $MotherTongue3$ $MotherTongue4$</strong><br /><%=GetText("C0007")%>: <strong>$TargetLanguage$ $TargetLanguage2$ $TargetLanguage3$ $TargetLanguage4$</strong>$Avatar_title$</div>
				</td>
				<td width="160" valign="top"><div class="margin20" style="margin-left: 20px">$OperateType$</div></td>
			</tr>
		</table>
	</div>
</div>
<div id="NoFriendsItem" style="display: none;">
	<p style="margin-bottom: 20px"><%=GetText("CT018")%>, <a href="/contacts/search.htm"><%=GetText("CT017")%></a></p>
	<div style="float: left; width: 141px; margin-bottom: 10px">
		<div class="pic90" style="width: 110px"><a class="photo_90" href='/$MemberNo$.htm'>$Avatar$</a></div>
		<div style="overflow: hidden; white-space: nowrap; width: 140px">$Online$&nbsp;<a href='/$MemberNo$.htm'>$NickName$</a><br />$speakNo$<br />$learnNo$<br />$from$<br /><img src="/Images/icon_add.gif" align="absmiddle" /> <a href="#" title="<%=GetText("C0078")%>" $AddContats$><%=GetText("C0078")%></a></div>
	</div>
</div>
<div id="DeletePanel" class="modalPopup DisplayNone" style="display: none">
	<div id="DeletePanelTitle">
		<div class="Popup_Title"><%=GetText("GP066")%></div>
	</div>
	<div class="Popup_content">
		<p><strong><%=GetText("C1008")%></strong></p>
		<p style="text-align: center;"><input type="button" value="<%=GetText("C0069")%>" id="OkButton5" class="button" />&nbsp;&nbsp;<input type="button" value="<%=GetText("C0056")%>" id="CancelButton5" class="buttong" /></p>
	</div>
</div>
<div id="AddPanel" class="modalPopup DisplayNone" style="display: none">
	<div id="AddPanelTitle">
		<div class="Popup_Title"><%=GetText("C1008")%></div>
	</div>
	<div class="Popup_content">
		<p style="text-align: center;"><input type="button" value="<%=GetText("C0069")%>" id="addOkButton" class="button" />&nbsp;&nbsp;<input type="button" value="<%=GetText("C0056")%>" id="addCancelButton" class="buttong" /></p>
	</div>
</div>
<div id="AcceptPanel" class="modalPopup DisplayNone" style="display: none">
	<div id="AcceptPanelTile">
		<div class="Popup_Title"><%=GetText("C1008")%></div>
	</div>
	<div class="Popup_content">
		<p style="text-align: center;"><input type="button" value="<%=GetText("C0069")%>" id="AcceptOkButton" class="button" />&nbsp;&nbsp;<input type="button" value="<%=GetText("C0056")%>" id="AcceptCancelButton" class="buttong" /></p>
	</div>
</div>
<asp:Literal ID="litScript" runat="server" />
<script>
var IsAffirm=<%=((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm.ToString().ToLower()%>;
	if (ShowUserType == 2) {
		$get("ReceTags").className = "selATags";
		if (HaveOrNoF == 1) {
			$get("QuestList").style.display = "none";
		}
	}
	else {
		$get("FriendTags").className = "selATags first";
	}
</script>